#include <iostream>
#include <string>
#include <cctype>

using namespace std;

int main()
{
	string s;
	cin>>s;
	int L=0,D=0,O=0;
	for(int i=0;i<s.size();i++){
		if(isalpha(s[i]))
		L++;
		else if(isdigit(s[i]))
		D++;
		else if(s[i]=='?')
		break;
		else
		O++;
	}
	cout<<"Letters="<<L<<endl;
	cout<<"Digit="<<D<<endl;
	cout<<"Others="<<O<<endl;
	
	return 0;
}

int main2()
{
    int n,m;
    int arr[20];
    int flag=1;
    while(cin>>n){
        for(int i=0;i<n;i++){
            cin>>arr[i];
        }
        cin>>m;
        for(int i=0;i<n;i++){
            if(arr[i]==m){
                cout<<i<<endl;
                flag=0;
                break;
            }
        }
        if(flag==1){
            cout<<"No"<<endl;
        }
        
    }
    return 0;
}

int main1()
{
	string s,t;
	int q;
	int l1,r1,l2,r2;
	cin>>s;
	cin>>t;
	cin>>q;
	for(int i=0;i<q;i++){
		cin>>l1>>r1>>l2>>r2;
		if(s.substr(l1-1,r1-l1+1)<s.substr(l2-1,r2-l2+1))
		cout<<"yifusuyi"<<endl;
		else if(s.substr(l1-1,r1-l1+1)>s.substr(l2-1,r2-l2+1))
		cout<<"erfusuer"<<endl;
		else
		cout<<"ovo"<<endl;
	}	
	return 0;
} 
